import React, { Component } from 'react';
import {
  Alert,
  View,
} from 'react-native'
import Scan from '../components/ScanQRCode' ;


export default class ScanQRCodeContainer extends Component {
  constructor(props) {
    super(props);
  }
  scanResult(data , callback){
    Alert.alert( "qrcode result " ,  data.data , [{text:"ok" , onPress:()=>callback()}],{cancelable:false}) ;
  }
  render() {
    return (
      <View style={{flex:1 }}>
        <Scan amout={this.props.amout} value={this.props.value}
          onBarCodeRead={this.scanResult.bind(this)}
        />
      </View>
    );
  }
}